﻿using Adalbertus.BudgetPlanner.Domain;
using FluentNHibernate.Mapping;

namespace Adalbertus.BudgetPlanner.Infrastructure.Mapping
{
    public class SavingMap : ClassMap<Saving>
    {
        public SavingMap()
        {
            Id(x => x.Id);

            Map(x => x.Name).Unique();

            HasMany(x => x.Entries).Inverse().Cascade.All();
        }
    }
}
